﻿using System.ServiceModel;
using VideoStore.Services.Dto;
using VideoStore.Common.Response;

namespace VideoStore.Services.Interface
{
    [ServiceContract(Namespace = "VideoStore.Services.StoreService")]
    public interface IStoreService
    {
        /// <summary>
        /// Gets the store by id.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns></returns>
        [OperationContract]
        Response<StoreDto> GetStoreById(int id);


        /// <summary>
        /// Creates the store.
        /// </summary>
        /// <param name="newStore">The new store.</param>
        /// <returns></returns>
        [OperationContract]
        [TransactionFlow(TransactionFlowOption.Allowed)]
        Response<StoreDto> CreateStore(StoreDto newStore);
    }
}
